package com.wst.wst_server.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @RequestMapping("/hello")
    @PreAuthorize("hasAuthority('test')")
    public String hello(){
        return "hello";
    }

    @RequestMapping("/add")
    @PreAuthorize("hasAuthority('org:orglist:list')")
    public String add(){
        return "org add !!!!!!!";
    }
}
